package observer_pattern;

import java.util.Observable;

/**
 * @author liwuji
 * @date 2023/12/26
 * @desc 可观察对象
 **/
public class OctalObserver extends Observable {
    public void  setDemo(String user){
        this.setChanged();
        this.notifyObservers(user);
        boolean b = hasChanged();
        System.out.println(b);
    }
}
